<!-- 
	动态组件：视频 组件
	props: 
		data: 组件数据
		
	action:
		https://oss.hsy884.com//upload/8/video/20230904110629960.mp4
		https://oss.hsy884.com//upload/2023/09/04/20230904110807179.jpeg
 -->
<template>
    <view class="dynamic-video">
       <view class="video">
           <video
               class="video-player"
               id="myVideo"
               :src="data.VideoSrc?data.VideoSrc:webinfo.ImgDomain+'//upload/material/'+webinfo.BusinessId+'/vedio/'+data.VideoName.toLowerCase()+'.mp4'"
               controls
			   :loop="true"
			   objectFit='cover' 
               :poster="data.VideoPoster"></video>
       </view>
    </view>
</template>

<script>
import storage from "@/uni-sub-base/utils/storage.js"
export default {
    props: {
        data: {
            type: Object,
            default: () => {},
        },
    },
    data() {
        return {
			webinfo:storage.getCache("webInfo")
		}
    },
    mounted() {
        this.$emit("loadBack", this.data.index)
    },
    methods: {},
}
</script>

<style lang="scss" scope>
@import "@/uni-sub-base/components/dynamic/style/dynamic.scss";
.video-player{
	width: 100%;
	object-fit: fill;
}
</style>
